﻿Public Class YoklamaEtiketBasimi
    Inherits ProcessReport

    Public Overrides Sub GenericEvent(ByVal e As ProcessEventArgs)
        Select Case e.EventType
            Case EventType.Initialize
				Text = "Yoklama Etiket Basımı"
                InitialHelp = "Kimlik bilgisini girin, tüm liste için boş bırakın."
                AddField("@Kimlik", "nl")
            Case EventType.ValidateForm
                Rs = Emeklilik.Yoklama.AdresListesi(Remote, Input("Kimlik"))
                e.Result = True
            Case EventType.ReportHeader
			Case EventType.ReportDetail
				Report.SetColumns("", "1;1", "l", "-")
				Do Until Rs.EOF
					Dim Info(1, 2) As String
					For i As Integer = 0 To 1
						If Not Rs.EOF Then
							Info(i, 0) = Rs("adi")
							Info(i, 1) = Rs("adr") & ""
							Info(i, 2) = Rs("adrsemt") & ""
							Rs.MoveNext()
						End If
					Next
					Report.Print(Info(0, 0), Info(1, 0))
					Report.Print(Info(0, 1), Info(1, 1))
					Report.Print(Info(0, 2), Info(1, 2))
					Report.SkipLine(3)
				Loop
		End Select
    End Sub

End Class
